home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Scheduling / Cassandra / Source / misc.h < prev    next >
Encoding:
Text File  |  1991-11-01  |  1.5 KB  |  43 lines

  1. //
  2. // misc.h    definitions of procedures in misc.m
  3. //
  4. // Misc - Miscellaneous I/O routines package
  5. //
  6. // Support functions for Cassandra
  7. // Copyright (c) 1988, 1989, 1990 by Jiro Nakamura
  8. //
  9. // RCS Information
  10. // Revision Number->    $Revision: 1.7 $
  11. // Last Revised->    $Date: 91/11/01 17:24:15 $
  12. //
  13.  
  14.  
  15. // Procedure:         FILE *fileOpen( char* filename, char *mode, 
  16. //                char *message)
  17. // Arguments:        char * filename     -> name of file to be opened
  18. //            char * mode        -> mode using fopen() 
  19. //                            (e.g. "r", "a+")
  20. //            char * message    -> message to be shown if fopen() fails
  21. // Description:     Opens file <filename> with mode <mode> using the 
  22. //            standard io function fopen(). 
  23. //            If an error occurs while trying to open it,
  24. //            fileOpen tries to create the file with creat() mode 
  25. //            0600. If that fails too, <message> is dispayed as an
  26. //            error message using the function NXAlertPanel() 
  27. //            and the functions aborts the program with exit()
  28. // Return Value:     FILE pointer to the open file.
  29. FILE *fileOpen( char * filename, char * mode, char *message);
  30.  
  31. // Procedure:         FILE * fileSeek(FILE *source, int here, char *message)
  32. // Arguments:         FILE *source, int here
  33. // Description:        This procedure will do an fseek on FILE <source>,
  34. //            the place seeked to is usually a record from a 
  35. //            database, with <here> as the
  36. //              record number and the global value FILE_LEN being 
  37. //            the record length.
  38. // Return Value:    NULL if a correctable error occured, 
  39. //            <source> if successful
  40. FILE *fileSeek(FILE *source, int here, char *message);
  41.  
  42.  
  43.